package com.zlp.spring.mybatis.service;

import com.zlp.spring.mybatis.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class UserService {

    @Autowired
    private UserMapper userMapper;

    public UserService(){
        System.out.println("non param constructor");

    }

    public UserService(UserMapper userMapper){
        this.userMapper = userMapper;
    }



    public List<Map<String,Object>> getUserList(){

        List<Map<String, Object>> users = userMapper.getUsers();
        System.out.println(users);
        return users;
    }
}
